<%@ page import="java.util.*" %>



<%
String sNickname ="";
String sPassword = "";

//Wenn das Formular abgeschickt wurde
if (request.getParameter("nickname") != null)
{
sNickname = request.getParameter("nickname");
sPassword = request.getParameter("password");
}
%>


<jsp:include page="layout/header.jsp" />


<script>
function validateForm()
{
	if (document.forms["Formular"]["nickname"].value == "") {
		    alert("Bitte Ihren Nickname eingeben!");
		    return false;
	}
	    if (document.forms["Formular"]["password"].value == "") {
		    alert("Bitte geben Sie Ihr Passwort eingeben!");
		    return false;
	}
}


</script>

 <form class="form-signin" name="Formular" action="Login" method="post" onsubmit="return validateForm()"> 
        <h2 class="form-signin-heading">Einloggen</h2>
        <input type="text" class="input-block-level" placeholder="Nickname"  name="nickname" value="<%= sNickname %>">
        <input type="password" class="input-block-level" placeholder="Passwort"  name="password" value="<%= sPassword %>">
        
        <input type="submit" class="btn btn-primary" value="Login">&nbsp;
        <input type="button" class="btn btn-primary" value="Abbrechen" onClick="this.form.reset()">
      </form>



<jsp:include page="layout/footer.jsp" />         